package com.salton123.groupbargain.ui.fm

import android.os.Bundle
import androidx.viewpager2.widget.ViewPager2
import com.hjq.bar.TitleBar
import com.salton123.groupbargain.R
import com.salton123.groupbargain.ui.adapter.RecommendAdapter
import com.salton123.ui.base.BaseFragment
import com.salton123.util.FragmentUtils
import kotlinx.android.synthetic.main.comp_recommend.*

/**
 * User: newSalton@outlook.com
 * Date: 2020-02-01 16:02
 * ModifyTime: 16:02
 * Description:
 */
class RecommendComp : BaseFragment() {
    private val mAdapter by lazy { RecommendAdapter(this) }
    override fun getLayout(): Int = R.layout.comp_recommend

    override fun initVariable(savedInstanceState: Bundle?) {
    }

    override fun initViewAndData() {
        viewpager2.orientation = ViewPager2.ORIENTATION_VERTICAL
        mAdapter.addDataNotify(FragmentUtils.newInstance(HelloFragment::class.java))
        mAdapter.addDataNotify(FragmentUtils.newInstance(HelloFragment::class.java))
        viewpager2.adapter = mAdapter
    }

    override fun fetchTitleBar(): TitleBar? {
        return null
    }
}